<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>儿子的儿子叫孙子</title>
    <script src="./res/jquery-3.5.1.min.js"></script>
    <style>
        .box {
            display: block;
            border: 2px solid #abcdef;
            color: #331258;
            padding: 5px;
            margin: 15px;
        }
    </style>
</head>

<body>
    <table align="center" border="1px" cellspacing="0px" width="300px" height="150px">
        <thead>
            <tr align="center">
                <th><input type="checkbox" id="isAll"></th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
            </tr>
        </thead>
        <tbody>
            <tr align="center">
                <td><input type="checkbox" class="form-check" value="19841123"></td>
                <td>小徐</td>
                <td>女</td>
                <td>16</td>
            </tr>
            <tr align="center">
                <td><input type="checkbox" class="form-check" value="19831122"></td>
                <td hidden>19831122</td>
                <td>小李</td>
                <td>男</td>
                <td>18</td>
            </tr>
        </tbody>
    </table>
</body>

</html>
<script>
    $(function(e) {
        $('tr').slice(1).click(function(e) {
            e.preventDefault();
            let checkbox = $("input:checkbox", this)[0];
            if (checkbox.checked) {
                checkbox.checked = false;
            } else {
                checkbox.checked = true;
            }
            // window.console.log($('input[type="checkbox"]'));
            window.console.log($('input:checkbox', this)[0].value);

        });
    });
</script>